From 7ae8ed82c9ce2656e0301b1d5161c683695b0c00 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Thu, 15 Oct 2020 21:04:51 -0700 Subject: [PATCH] macos: fix fps calculation for frame timings We need to mark the timings as complete after adding the presentation time so that we have a valid FPS for the overlay widget and/or fishbowl demo. --- gdk/macos/gdkmacossurface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c index ec0fb41560..9925407d46 100644 --- a/gdk/macos/gdkmacossurface.c +++ b/gdk/macos/gdkmacossurface.c @@ -713,7 +713,10 @@ _gdk_macos_surface_thaw (GdkMacosSurface *self, timings = gdk_frame_clock_get_timings (frame_clock, self->pending_frame_counter); if (timings != NULL) - timings->presentation_time = presentation_time - refresh_interval; + { + timings->presentation_time = presentation_time - refresh_interval; + timings->complete = TRUE; + } self->pending_frame_counter = 0; } -- 2.30.2